<template>
  <div>
    <div>
      <h1>配送到家</h1>

      <DeliveryItem :list="list"></DeliveryItem>
    </div>
  </div>
</template>

<script>
import DeliveryItem from "./components/deliveryItem";
// import Dialog from "@/components/dialog";
// showDialog
import { mapState } from "vuex";
export default {
  data() {
    return {
      list: [],
    };
  },
  watch: {
    // isShow(v) {
    //   console.log("v:", v);
    // },
  },
  computed: {
    // ...mapState(["isShow"]),
  },
  components: {
    DeliveryItem,
    // Dialog,
  },
  mounted() {
    this.getCartData();
  },
  methods: {
    async getCartData() {
      console.log(1);
      let data = await this.$http.get("/api/list");
      console.log(data.data.data);
      this.list = data.data.data;
    },
  },
};
</script>

<style>
</style>